package com.qd.pay.domain;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;


@Data
@Accessors(chain = true)
public class OrderRefundReportDTO {

    private String rid;

    @Size(max = 32, message = "transactionId长度不能超过{max}位")
    private String transactionId;

    @Size(max = 64, message = "outRefundNo长度不能超过{max}位")
    private String outRefundNo;

    private LocalDateTime timeEnd;

    @Size(max = 64, message = "refundRecvAccout长度不能超过{max}位")
    private String refundRecvAccout;

    private BigDecimal refundFee;

    @Size(max = 20, message = "refundStatus长度不能超过{max}位")
    private String refundStatus;

    @Size(max = 30, message = "refundRequestSource长度不能超过{max}位")
    private String refundRequestSource;

    private LocalDateTime addTime;

    private Integer refundNo;

    @Size(max = 50, message = "orderId长度不能超过{max}位")
    private String orderId;

    private OrderRefundWxReportDTO orderRefundWxReportDto;

    private String xml;

    public void freeData() {
        this.rid = null;
        this.transactionId = null;
        this.outRefundNo = null;
        this.timeEnd = null;
        this.refundRecvAccout = null;
        this.refundFee = null;
        this.refundStatus = null;
        this.refundRequestSource = null;
        this.addTime = null;
        this.refundNo = null;
        this.orderId = null;
        if (null != this.orderRefundWxReportDto) {
            this.orderRefundWxReportDto.freeData();
            this.orderRefundWxReportDto = null;
        }
        this.xml = null;
    }
}
